import React, { Component } from "react";
import "./index.css";
/**
 * 限定父组件传入值类型
 *
 * @interface IProps
 */
interface IProps {
  errorText: string;
  isError: boolean;
}
export default class Idcard extends Component<IProps> {
  public render() {
    const { errorText, isError } = this.props;
    console.log(errorText, isError);

    let show = isError ? (
      <div className="content-box">
        <div className="content">
          <div className="support-title">温馨提示</div>
          <div className="text">{errorText}</div>
          <button className="cancel">知道了</button>
        </div>
      </div>
    ) : (
      <div className="hide"></div>
    );

    return <div>{show}</div>;
  }
}
